import {
  publishPro
} from '../../../utils/api.js'

const app = getApp()
Page({

  /**
   * 页面的初始数据
   */
  data: {
    list: []
  },
  todetail: function (e) {
    wx.navigateTo({
      url: '../detail/detail',
    })
  },
  //发布的项目
  publishPro() {
    let userId = app.globalData.userId
    publishPro(userId).then((res) => {
      console.log('发布的项目', res);
      this.setData({
        list:res.data
      })
    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    let that = this
    that.publishPro()
  },
})